# -*- coding: utf-8 -*-

class MainWindow_Qss():
    # ****************主界面背景*******************
    Ui_Qss_1 = '''
            QWidget#MainWindow {
                background: rgb(68, 69, 73);
            }
            QWidget#centralWidget {
                background: rgb(68, 69, 73);
            }
     '''
    # ********************提示*********************
    Ui_Qss_2 = '''
            QToolTip{
                border: 1px solid rgb(45, 45, 45);
                background: white;
                color: black;
            }
    '''
    # *******************菜单栏********************
    Ui_Qss_3 = '''
            QMenuBar {
                background: rgb(57, 58, 60);
                border: none;
            }
            QMenuBar::item {
                padding: 5px 10px 5px 10px;
                background: transparent;
            }
            QMenuBar::item:enabled {
                color: rgb(227, 234, 242);
            }
            QMenuBar::item:enabled:selected {
                color: rgb(255, 255, 255);
                background: rgba(255, 255, 255, 60);
            }
            QMenuBar::item:!enabled {
                color: rgb(155, 155, 155);
            }
    '''

    # ********************菜单*********************
    Ui_Qss_4 = '''
            QMenu{
                border: 1px solid rgb(100, 100, 100);
                background: rgb(68, 69, 73);
            }
            QMenu::item {
                height: 22px;
                padding: 0px 25px 2px 20px;
            }
            QMenu::item:enabled {
                color: rgb(225, 225, 225);
            }
            QMenu::item:enabled:selected {
                color: rgb(230, 230, 230);
                background: rgba(255, 255, 255, 40);
            }
            QMenu::item:!enabled {
                color: rgb(155, 155, 155);
            }
            QMenu::separator {
                height: 1px;
                background: rgb(100, 100, 100);
            }
            QMenu::indicator {
                width: 13px;
                height: 13px;
            }
            QMenu::icon {
                padding-left: 2px;
                padding-right: 2px;
            }
    '''

    # ******************状态栏********************
    Ui_Qss_5 = '''
            QStatusBar {
                background: rgb(57, 58, 60);
            }
            QStatusBar::item {
                border: none;
                border-right: 1px solid rgb(100, 100, 100);
            }
    
    '''

    # ******************分组框********************
    Ui_Qss_6 = '''
            QGroupBox {
                font-size: 12px;
                border: 1px solid rgb(80, 80, 80);
                border-radius: 5px;
                margin-top: 10px;
                margin-bottom: 5px;
            }
            QGroupBox::title {
                color: rgb(175, 175, 175);
                top: -8px;
                left: 5px;
            }
    '''

    # ******************页签项********************
    Ui_Qss_7 = '''
            QTabWidget::pane {
                border: none;
                border-color: rgb(80, 80, 80);
                border-top: 3px solid rgb(0, 160, 230);
                background: rgb(57, 58, 60);
            }
            QTabWidget::tab-bar {
                border: none;
            }
            QTabBar::tab {
                border: none;
                border-top-left-radius: 2px;
                border-top-right-radius: 2px;
                color: rgb(175, 175, 175);
                background: rgb(255, 255, 255, 30);
                height: 20px;
                min-width: 60px;
                margin-right: 2px;
                padding-left: 5px;
                padding-right: 5px;
            }
            QTabBar::tab:enabled:hover {
                color: rgb(255, 255, 255);
                background: rgb(255, 255, 255, 40);
            }
            QTabBar::tab:selected {
                color: white;
                background: rgb(0, 160, 230);
            }
            QWidget #scrollAreaWidgetContents {
                background: rgb(57, 58, 60);
            }
            QRadioButton::indicator {
                width: 20px;
                height: 20px;
            }
    '''
    # **********************单选框*************************
    Ui_Qss_8 = '''
        QRadioButton {
            color: rgb(175, 175, 175);
        }
        QRadioButton:enabled:hover{
            background: rgb(255, 255, 255, 40);
        }
        QRadioButton:!enabled{
            color: rgb(155, 155, 155);
        }
        QRadioButton::indicator:unchecked {
            image: url(./Black/radioButton.png);
        }
        QRadioButton::indicator:unchecked:enabled:hover {
            image: url(./Black/radioButtonHover.png);
        }
        QRadioButton::indicator:unchecked:pressed {
            image: url(./Black/radioButtonPressed.png);
        }
        QRadioButton::indicator:checked {
            image: url(./Black/radioButtonChecked.png);
        }
        QRadioButton::indicator:checked:enabled:hover {
            image: url(./Black/radioButtonCheckedHover.png);
        }
        QRadioButton::indicator:checked:enabled:pressed {
            image: url(./Black/radioButtonCheckedPressed.png);
        }
    '''

    # **********************输入框*************************
    Ui_Qss_9 = '''
        QLineEdit {
            border-radius: 4px;
            height: 20px;
            border: 1px solid rgb(100, 100, 100);
            background: rgb(72, 72, 73);
            color: rgb(169, 183, 193);
        }
        QLineEdit:enabled:hover {
            border-color: rgb(0, 160, 230);
        }
        QLineEdit:enabled:focus {
            border-color: rgba(0, 160, 230, 100);
        }
    '''

    # **********************标签***************************
    Ui_Qss_10 = '''
        QLabel {
            color: rgb(155, 155, 155);
        }
    '''

    # **********************QTextBrowser***************************
    Ui_Qss_11 = '''
        QTextBrowser {
            border: 1px solid rgb(80, 80, 80);
            background: rgb(57, 58, 60);
            color: rgb(155, 155, 155);
        }
        
    '''

    # **************************按钮********************************
    Ui_Qss_12 = '''
            QPushButton{
                border-radius: 4px;
                border: none;
                width: 75px;
                height: 25px;
            }
            QPushButton:enabled {
                background: rgb(85, 85, 85);
                color: rgb(175, 175, 175);
            }
            QPushButton:!enabled {
                background: rgb(100, 100, 100);
                color: rgb(200, 200, 200);
            }
            QPushButton:enabled:hover{
                color: rgb(255, 255, 255);
                background: rgb(0, 160, 230);
            }
            QPushButton:enabled:pressed{
                background: rgb(0, 160, 230);
            }
    '''

    # *************************分隔条*******************************
    Ui_Qss_13 = '''
        QSplitter::handle {
            border: 1px solid rgb(80, 80, 80);
            image: url(./Black/scan.png);
        }
    '''
    # *************************表格*********************************
    Ui_Qss_14 = '''
        QTableView {
            border: 1px solid rgb(80, 80, 80);
            background: rgb(57, 58, 60);
            gridline-color: rgb(80, 80, 80);
        }
        QHeaderView{
            border: none;
            background: rgb(57, 58, 60);
        }
        QHeaderView::section:horizontal {
            height : 15px;
            border: none;
            color: rgb(175, 175, 175);
            background: transparent;
            padding-left: 5px;
        }
        QHeaderView::section:vertical {
            border: none;
            width: 15px;
            color: rgb(175, 175, 175);
            background: transparent;
            padding-left: 0px;
        }
        QHeaderView::section:horizontal:hover {
            color: white;
            background: rgb(0, 160, 230);
        }
        QHeaderView::section:vertical:hover {
            color: white;
            background: rgb(0, 160, 230);
        }
        QHeaderView::section:vertical:pressed {
            color: white;
            background: rgb(0, 180, 255);
        }
        QHeaderView::section:horizontal:pressed {
            color: white;
            background: rgb(0, 180, 255);
        }
        
        
        QTableView::item:enabled:hover {
            color: white;
            background: rgba(255, 255, 255, 40);
        }
        QTableView::item:selected {
            color: white;
            background: rgba(255, 255, 255, 40);
        }
    '''

    # ***********************滚动条*******************************

    Ui_Qss_15 = '''
        QScrollBar:horizontal {
            height: 20px;
            background: transparent;
            margin-top: 3px;
            margin-bottom: 3px;
        }
        QScrollBar::handle:horizontal {
            height: 20px;
            min-width: 30px;
            background: rgb(68, 69, 73);
            margin-left: 15px;
            margin-right: 15px;
        }
        QScrollBar::handle:horizontal:hover {
            background: rgb(80, 80, 80);
        }
        QScrollBar::sub-line:horizontal {
            width: 15px;
            background: transparent;
            image: url(./Black/arrowLeft);
            subcontrol-position: left;
        }
        QScrollBar::add-line:horizontal {
            width: 15px;
            background: transparent;
            image: url(./Black/arrowRight);
            subcontrol-position: right;
        }
        QScrollBar::sub-line:horizontal:hover {
            background: rgb(68, 69, 73);
        }
        QScrollBar::add-line:horizontal:hover {
            background: rgb(68, 69, 73);
        }
        QScrollBar::add-page:horizontal,QScrollBar::sub-page:horizontal {
            background: transparent;
        }
        QScrollBar:vertical {
            width: 20px;
            background: transparent;
            margin-left: 3px;
            margin-right: 3px;
        }
        QScrollBar::handle:vertical {
            width: 20px;
            min-height: 30px;
            background: rgb(68, 69, 73);
            margin-top: 15px;
            margin-bottom: 15px;
        }
        QScrollBar::handle:vertical:hover {
            background: rgb(80, 80, 80);
        }
        QScrollBar::sub-line:vertical {
            height: 15px;
            background: transparent;
            image: url(./Black/arrowTop);
            subcontrol-position: top;
        }
        QScrollBar::add-line:vertical {
            height: 15px;
            background: transparent;
            image: url(./Black/arrowBottom);
            subcontrol-position: bottom;
        }
        QScrollBar::sub-line:vertical:hover {
            background: rgb(68, 69, 73);
        }
        QScrollBar::add-line:vertical:hover {
            background: rgb(68, 69, 73);
        }
        QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
            background: transparent;
        }
    '''

    # 不知道为什么QLineEdit:hover,:focus不可用
    Ui_Qss = Ui_Qss_1 + Ui_Qss_2 + Ui_Qss_3 + Ui_Qss_4 + Ui_Qss_5 \
             + Ui_Qss_6 + Ui_Qss_7 + Ui_Qss_8 + Ui_Qss_9 + Ui_Qss_10 \
             + Ui_Qss_11 + Ui_Qss_12 + Ui_Qss_13 + Ui_Qss_14 + Ui_Qss_15

# 注释
